package com.epoch.client.kernel.serve;

import java.net.Socket;
import java.util.HashMap;

/**
 * 这是管理客户端线程的类,将创建好的线程放到hashmap里面去。
 */
public class SocketMappingManager {
    public static HashMap<String, Socket> mapping = new HashMap<>();
    //把创建好的线程放入hashmap
    public static void addSocket(String username, Socket socketMapping){
        mapping.put(username, socketMapping);
    }
    //获取map存放的线程
    public static Socket getSocket(String userName){
        return mapping.get(userName);
    }
}
